<!DOCTYPE html>
<html lang="en" ng-app="module">
<head>
    <meta charset="UTF-8">
    <title>过滤筛选</title>
    <link rel="stylesheet" type="text/css" href="../css/common.css" />
    <script src="../js/common/jquery.js"></script>
    <script src="../js/common/drag.js"></script>
    <script src="../js/common/angular.min.js"></script>
    <script type="text/javascript" src="../js/common/common.js"></script>
    <script type="text/javascript" src="../js/case/FiltrationScreening.js"></script>
</head>
<body ng-controller="ctrl">
    名字：<input type="text" ng-model="a.name">
    价格: <input type="text" ng-model="a.price">
    分类:
    <select name="" id="" ng-model="a.category">
        <option value=""> 请选择</option>
        <option ng-repeat="category in categories" value="{{category.id}}">{{category.name}}</option>
    </select>
    <button ng-click="a={}">重置</button>
    <table border="1" style="width: 800px;margin-top: 15px;">
        <tr>
            <td>名字</td>
            <td>价格</td>
            <td>分类</td>
        </tr>
        <tr ng-repeat="book in books | getBook : a">
            <td>{{book.name}}</td>
            <td>{{book.price}}</td>
            <td>{{book.category | getName:categories}}</td>
        </tr>
    </table>
</body>
</html>